package etc.server;//package com.dmz.api.test;

import com.dmz.test.etc.server.csp.CspServer;
import com.dmz.test.etc.server.etc.EtcServer;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * @author lee
 */
@Component
public class TestListener implements ApplicationRunner {

    @Override
    public void run(ApplicationArguments args) {
        new Thread(() -> {
            try {
                new CspServer(17010).start();
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }).start();

        new Thread(() -> {
            try {
                new EtcServer(6001).start();
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }).start();

        new FtpServer().socketStart();
    }
}
